//
//  TogetherBuyItemCellHeader.m
//  PlayBall
//
//  Created by Jdd‘s macbook on 13-9-24.
//
//

#import "JddTogetherBuyItemCellHeader.h"
#import "JddTogetherBuyViewController.h"
#import "ConstHeader.h"

@implementation JddTogetherBuyItemCellHeader
GET_INSTANCE_VIEW_IMPLEMENT(JddTogetherBuyItemCellHeader)

-(IBAction)HeadClicked:(id)sender{
    self.open = !self.open;
    [self.delegate performSelector:@selector(sportTeamButtonHeadClicked:) withObject:self.statePosition];
}

- (IBAction)detailAction:(id)sender {
    [self.delegate performSelector:@selector(detailAction:) withObject:self.statePosition];
}


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self.open = YES;
    }
    return self;
}

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    [super drawRect:rect];
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetLineWidth(context, 1);
    //CGContextSetStrokeColorWithColor(context, [UIColor lightGrayColor].CGColor);
    CGContextSetStrokeColorWithColor(context, BORDER_COLOR);
    CGContextMoveToPoint(context, 0, rect.size.height);
    CGContextAddLineToPoint(context, rect.size.width, rect.size.height);
    CGContextClosePath(context);
    CGContextStrokePath(context);
}



@end
